package NO13;

public class Student extends teacher{
    public String aex;
    int no;
    double scoreEn;
    double scoreMath;
    double scoreCh;



    public double aver() {
        return (scoreCh + scoreEn + scoreMath)/3;
    }
    public double max(){
        return Math.max(Math.max(scoreCh,scoreEn),scoreMath);

    }
    public double min(){
        return Math.min(Math.min(scoreCh,scoreMath),scoreEn);
    }
    public Student() {
            super();
        this.no = no;
            this.scoreEn = scoreEn;
            this.scoreMath = scoreMath;
            this.scoreCh = scoreCh;
    }
    @Override
    public String toString() {
        return "Student{" +
                "no=" + no +
                ", scoreEn=" + scoreEn +
                ", scoreMath=" + scoreMath +
                ", scoreCh=" + scoreCh +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", aeg=" + aeg +
                '}';
    }
}
